// console.log('----------------------------------------');
// const zeros = [0,0,0,0,0];
// console.log(zeros.fill(5));//[ 5, 5, 5, 5, 5 ]
// //重置
// zeros.fill(0);
// console.log(zeros.fill(6,3));//[ 0, 0, 0, 6, 6 ]
// zeros.fill(0);
// console.log(zeros.fill(7,1,3));//[ 0, 7, 7, 0, 0 ]
// zeros.fill(0);
// console.log(zeros.fill(8,-4,-1));//[ 0, 8, 8, 8, 0 ]
// zeros.fill(0);
// console.log(zeros.fill(1,-10,-6));//[ 0, 0, 0, 0, 0 ]
// console.log(zeros.fill(1,10,15));//[ 0, 0, 0, 0, 0 ]
// console.log(zeros.fill(1,3,2));//[ 0, 0, 0, 0, 0 ]
// console.log(zeros.fill(4,3,10));//[ 0, 0, 0, 4, 4 ]
console.log('---------------------------------------------');
let ints,reset = () => [0,1,2,3,4,5,6,7,8,9];
ints = reset();
ints.copyWithin(5);
console.log(ints);
ints = reset();
// [
//     0, 1, 2, 3, 4,
//     0, 1, 2, 3, 4
// ]
ints.copyWithin(0,5);
console.log(ints);
ints = reset();
// [
//     5, 6, 7, 8, 9,
//     5, 6, 7, 8, 9
// ]
ints.copyWithin(4,0,3);
console.log(ints);
ints = reset();
// [
//     0, 1, 2, 3, 0,
//     1, 2, 7, 8, 9
// ]
ints.copyWithin(2,0,6);
console.log(ints);
ints = reset();;
// [
//     0, 1, 0, 1, 2,
//     3, 4, 5, 8, 9
// ]
ints.copyWithin(-4,-7,-3);//==>(6,3,7);
console.log(ints);
// [
//     0, 1, 2, 3, 4,
//     5, 3, 4, 5, 6
// ]
